package com.cacheserverdeploy.node;

import java.util.ArrayList;
import java.util.List;

/**
 * 消费节点
 * Created by Xingfeng on 2017-03-08.
 */
public class ConsumeNode {

    /**
     * 消费节点编号
     */
    private int id;
    /**
     * 视频需求量
     */
    private int required;
    /**
     * 剩余需求量
     */
    private int extraRequired;
    /**
     * 相邻网络节点编号
     */
    private int networkNodeId;
    /**
     * 存储路径，与输出格式相同
     */
    private List<List<Integer>> road;

    public ConsumeNode(int id,  int networkNodeId,int required) {
        this.id = id;
        this.required = required;
        this.networkNodeId = networkNodeId;
    }

    public int getId() {
        return id;
    }

    public int getExtraRequired() {
        return extraRequired;
    }

    public void setExtraRequired(int extraRequired) {
        this.extraRequired = extraRequired;
    }

    public int getNetworkNodeId() {
        return networkNodeId;
    }

	public int getRequired() {
		return required;
	}

	public void setRequired(int required) {
		this.required = required;
	}

	public List<List<Integer>> getRoad() {
		if(road==null){
			road=new ArrayList<>();
		}
		return road;
	}

	public void setRoad(List<List<Integer>> road) {
		this.road = road;
	}
}
